package leetcode.violence;

public class hanio {
    public static void main(String[] args) {
        int n =3;
        process(n,"左","右","中");
    }
    public static void process(int res,String start,String end,String other){
        if (res == 1){
            System.out.println("Move 1 from"+ start + "to" + end);
        }else {
            process(res-1, start, other, end);
            System.out.println("Move "+ res +" from"+ start + "to" + end);
            process(res-1, other, end, start);
        }
    }
}
